/*
  @author: 13813
  @date: 2024/11/8 9:25
*/
public class IfElseIfDemo {
    public static void main(String[] args) {
          /*
            定义一个月份，输出此月份的天数
         */

        int month = 6;

        if(month == 1){
            System.out.println("31");
        }

        if(month == 2){
            System.out.println("28");
        }

        if(month == 3){
            System.out.println("31");
        }

        if(month == 4){
            System.out.println("30");
        }

        if(month == 5){
            System.out.println("31");
        }

        if(month == 6){
            System.out.println("30");
        }

        if(month == 7){
            System.out.println("31");
        }

        if(month == 8){
            System.out.println("31");
        }

        if(month == 9){
            System.out.println("30");
        }

        if(month == 10){
            System.out.println("31");
        }

        if(month == 11){
            System.out.println("30");
        }

        if(month == 12){
            System.out.println("31");
        }

        if (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12) {
            System.out.println("31");
        }

        if (month == 4 || month == 6 || month == 9 || month == 11) {
            System.out.println("30");
        }

        if (month == 2) {
            System.out.println("28");
        }
    }
}
